#include <iostream>

char *GetMemory(void)
{
    char p[] = "hello world";
    return p;
}

char *GetMemory2(void)
{
    char *p = "hello world2";
    return p;
}

int main(int argc, const char *argv[])
{
    char *str = NULL;
    str = GetMemory();
    std::cout << str << std::endl;

    char *str2 = NULL;
    str2 = GetMemory();
    std::cout << str2 << std::endl;
    return 0;
}
